home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 114 / PC Guia 114.iso / Software / Utils / The Gimp 2.2.1 / gimp-help-2-0.6-setup.exe / {app} / share / gimp / 2.0 / help / en / ch02s04s08.html < prev    next >
Encoding:
Extensible Markup Language  |  2004-12-19  |  34.0 KB  |  775 lines

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4.   <head>
  5.     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  6.     <title>4.8.┬áBrushes</title>
  7.     <link rel="stylesheet" href="gimp-help-plain.css" type="text/css" />
  8.     <link rel="stylesheet" href="gimp-help-screen.css" type="text/css" />
  9.     <meta name="generator" content="DocBook XSL Stylesheets V1.66.1" />
  10.     <link rel="start" href="index.html" title="GIMP User Manual" />
  11.     <link rel="up" href="ch02s04.html" title="4.┬áWorking with Images" />
  12.     <link rel="prev" href="ch02s04s07.html" title="4.7.┬áPaths" />
  13.     <link rel="next" href="ch02s04s09.html" title="4.9.┬áGradients" />
  14.   </head>
  15.   <body>
  16.     <div xmlns="" class="navheader">
  17.       <table width="100%" summary="Navigation header">
  18.         <tr>
  19.           <th colspan="3" align="center" id="chaptername">4.┬áWorking with Images</th>
  20.         </tr>
  21.         <tr>
  22.           <td width="20%" align="left"><a accesskey="p" href="ch02s04s07.html">Prev</a>┬á</td>
  23.           <th width="60%" align="center" id="sectionname">4.8.┬áBrushes</th>
  24.           <td width="20%" align="right">┬á<a accesskey="n" href="ch02s04s09.html">Next</a></td>
  25.         </tr>
  26.       </table>
  27.       <hr />
  28.     </div>
  29.     <div class="sect2" lang="en" xml:lang="en">
  30.       <div class="titlepage">
  31.         <div>
  32.           <div>
  33.             <h3 class="title"><a id="gimp-brushes"></a>4.8.┬áBrushes</h3>
  34.           </div>
  35.         </div>
  36.       </div>
  37.       <a id="id3423369" class="indexterm"></a>
  38.       <div class="informalfigure">
  39.         <div class="mediaobject">
  40.           <img src="../images/using/brush-examples.png" />
  41.           <div class="caption">
  42.             <p>
  43.            A number of examples of brushstrokes painted using different
  44.            brushes from the set supplied with GIMP.  All were painted
  45.            using the Paintbrush tool.
  46.         </p>
  47.           </div>
  48.         </div>
  49.       </div>
  50.       <p>
  51.     A <span class="emphasis"><em>brush</em></span> is a pixmap or set of pixmaps used for
  52.     painting.  GIMP includes a set of 10 "paint tools, which not
  53.     only perform operations that you would think of as painting, but
  54.     also operations such as erasing, copying, smudging, lightening or
  55.     darkening, etc.  All of the paint tools, except the ink tool, use
  56.     the same set of brushes.  The brush pixmaps represent the
  57.     marks that are made by single "touches" of the brush to the image. 
  58.     A brush stroke, usually made by moving the pointer across the image with 
  59.     the mouse button held down, produces a series of marks spaced along the
  60.     trajectory, in a way specified by the characteristics of the brush
  61.     and the paint tool being used.
  62.   </p>
  63.       <p>
  64.     Brushes can be selected by clicking on an icon in the <a href="ch04s10.html" title="10.┬áBrushes dialog">Brushes dialog</a>.  GIMP's
  65.     <span class="emphasis"><em>current brush</em></span> is shown in the
  66.     Brush/Pattern/Gradient area of the Toolbox.  Clicking on the brush
  67.     symbol there is one way of activating the Brushes dialog.
  68.   </p>
  69.       <p>
  70.     When you install GIMP, it comes presupplied with a number of basic
  71.     brushes, plus a few bizarre ones that serve mainly to give you
  72.     examples of what is possible (i. e., the "green pepper" brush in
  73.     the illustration).  You can also create new brushes, or
  74.     download them and install them so that GIMP will recognize them.
  75.   </p>
  76.       <p>
  77.     GIMP can use several different types of brushes.  All of them,
  78.     however, are used in the same way, and for most purposes you don't
  79.     need to be aware of the differences when you paint with them.
  80.     Here are the available types of brushes:
  81.   </p>
  82.       <div class="variablelist">
  83.         <dl>
  84.           <dt>
  85.             <span class="term">Ordinary brushes</span>
  86.           </dt>
  87.           <dd>
  88.             <p>
  89.           Most of the brushes supplied with GIMP fall into this
  90.           category.  They are represented in the Brushes dialog by
  91.           grayscale pixmaps.  When you paint using them, the current
  92.           foreground color (as shown in the Color Area of the Toolbox)
  93.           is substituted for black, and the pixmap shown in the brushes
  94.           dialog represents the mark that the brush makes on the image.
  95.         </p>
  96.             <p>
  97.           To create such a brush: 
  98.           Create a small image in gray levels using zoom. Save it with the 
  99.           .gbr extension. Click on Refresh button in the Brush Dialog to get 
  100.           it in preview without it being necessary to restart GIMP.
  101.         </p>
  102.           </dd>
  103.           <dt>
  104.             <span class="term">Color brushes</span>
  105.           </dt>
  106.           <dd>
  107.             <p>
  108.           Brushes in this category are represented by colored images in
  109.           the Brushes dialog. They can be a text. When you paint with them, 
  110.           the colors are used as shown; the current foreground color does 
  111.           not come into play.  Otherwise they work the same way as ordinary 
  112.           brushes.
  113.         </p>
  114.             <p>
  115.           To create such a brush, create a small RGBA image. For this, open 
  116.           New Image, select RGB for image type and Transparent for fill type. 
  117.           Draw your image and save it first to .xcf file to keep its 
  118.           properties. Then save it to .gbr format. Click on 
  119.           <span class="emphasis"><em>Refresh</em></span> button in Brush Dialog to get your 
  120.           brush without it being necessary to restart Gimp.
  121.         </p>
  122.             <div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;">
  123.               <table border="0" summary="Tip">
  124.                 <tr>
  125.                   <td rowspan="2" align="center" valign="top" width="25">
  126.                     <img alt="[Tip]" src="../images/tip.png" />
  127.                   </td>
  128.                   <th align="left">Tip</th>
  129.                 </tr>
  130.                 <tr>
  131.                   <td colspan="2" align="left" valign="top">
  132.                     <p>
  133.             You can transform a selection to a brush by using the 
  134.             Selection/To Brush script-fu.
  135.           </p>
  136.                   </td>
  137.                 </tr>
  138.               </table>
  139.             </div>
  140.           </dd>
  141.           <dt>
  142.             <span class="term">Image hoses / Image pipes</span>
  143.           </dt>
  144.           <dd>
  145.             <p>
  146.           Brushes in this category can make more than one kind of mark
  147.           on an image.  They are indicated by small red triangles at th
  148.           lower right corner of the brush symbol in the Brushes dialog.
  149.           They are sometimes called "animated brushes" 
  150.           because the marks change as you trace out a brushstroke. In
  151.           principle, image hose brushes can be very sophisticated,
  152.           especially if you use a tablet, changing shape as a function
  153.           of pressure, angle, etc.  These possibilities have never
  154.           really been exploited, however; and the ones supplied with
  155.           GIMP are relatively simple (but still quite useful). 
  156.         </p>
  157.           </dd>
  158.           <dt>
  159.             <span class="term">Parametric brushes</span>
  160.           </dt>
  161.           <dd>
  162.             <p> 
  163.           These are brushes created using the <a href="ch04s10.html#gimp-brush-editor-dialog" title="Brush Editor">Brush Editor</a>, which
  164.           allows you to generate a wide variety of brush shapes by
  165.           using a simple graphical interface.  A nice feature of
  166.           parametric brushes is that they are
  167.           <span class="emphasis"><em>resizable</em></span>.  In GIMP 2.2, it is possible,
  168.           using the Preferences dialog, to make key presses or mouse
  169.           wheel rotations cause the current brush to become larger or
  170.           smaller, if it is a parametric brush.
  171.         </p>
  172.           </dd>
  173.         </dl>
  174.       </div>
  175.       <p>
  176.     One category that GIMP does not have is full-fledged
  177.     <span class="emphasis"><em>procedural</em></span> brushes:  brushes whose marks are
  178.     calculated procedurally, instead of being taken from a fixed
  179.     pixmap.  (Actually this is not quite correct:  the Ink tool uses a
  180.     procedural brush, but it is the only one available in GIMP.)  A
  181.     more extensive implementation of procedural brushes is a goal of
  182.     future development for GIMP.
  183.   </p>
  184.       <p>
  185.     In addition to the brush pixmap, each GIMP brush has one other
  186.     important property:  the brush <span class="emphasis"><em>Spacing</em></span>. This
  187.     represents the distance between consecutive brush-marks when a
  188.     continuous brushstroke is painted.  Each brush has an assigned
  189.     default value for this, which can be modified using the Brushes
  190.     dialog. 
  191.   </p>
  192.       <div class="simplesect" lang="en" xml:lang="en">
  193.         <div class="titlepage">
  194.           <div>
  195.             <div>
  196.               <h4 class="title"><a id="id3423622"></a>Adding New Brushes</h4>
  197.             </div>
  198.           </div>
  199.         </div>
  200.         <p>        
  201.       To add a new brush, after either creating it or downloading it, so 
  202.       that it shows up in the Brushes dialog, you need to save it in a 
  203.       format GIMP can use, in a folder included in GIMP's brush search path, 
  204.       then to <span class="emphasis"><em>Refresh</em></span> the Brush Dialog (or re-start 
  205.       GIMP). GIMP uses three file formats for brushes: 
  206.     </p>
  207.         <div class="variablelist">
  208.           <dl>
  209.             <dt>
  210.               <span class="term">GBR</span>
  211.             </dt>
  212.             <dd>
  213.               <p>
  214.             The <tt class="filename">.gbr</tt> ("<span class="emphasis"><em>g</em></span>imp
  215.             <span class="emphasis"><em>br</em></span>ush") format is used for ordinary and
  216.             color brushes.  You can convert many other types of images,
  217.             including many brushes used by other programs, into GIMP
  218.             brushes by opening them in GIMP and saving them with file
  219.             names ending in <tt class="filename">.gbr</tt>.  This brings up a
  220.             dialog box in which you can set the default Spacing for the
  221.             brush.  A more complete description of the GBR file format
  222.             can be found in the file <tt class="filename">gbr.txt</tt> in the
  223.             <tt class="filename">devel-docs</tt> directory of the GIMP source
  224.             distribution. 
  225.           </p>
  226.             </dd>
  227.             <dt>
  228.               <span class="term">GIH</span>
  229.             </dt>
  230.             <dd>
  231.               <p>         
  232.             The <tt class="filename">.gih</tt> ("<span class="emphasis"><em>g</em></span>imp
  233.             <span class="emphasis"><em>i</em></span>mage <span class="emphasis"><em>h</em></span>ose")
  234.             format is used for animated brushes.  These brushes are
  235.             constructed from images containing multiple layers:  each
  236.             layer may contain multiple brush-shapes, arranged in a
  237.             grid.  When you save an image as a <tt class="filename">.gih</tt>
  238.             file, a dialog comes up that allows you to describe the
  239.             format of the brush.  The GIH format is rather complicated:
  240.             a complete description can be found in the
  241.             file <tt class="filename">gih.txt</tt> in the 
  242.             <tt class="filename">devel-docs</tt> directory of the GIMP source
  243.             distribution. See
  244.             <a href="ch02s04s08.html#gimp-GIH-dialog" title="The GIH dialog box">The GIH dialog box</a> 
  245.           </p>
  246.             </dd>
  247.             <dt>
  248.               <span class="term">VBR</span>
  249.             </dt>
  250.             <dd>
  251.               <p>
  252.             The <tt class="filename">.vbr</tt> format is used for parametric
  253.             brushes, i. e., brushes created using the Brush Editor.
  254.             There is really no other meaningful way of obtaining files
  255.             in this format.
  256.           </p>
  257.               <p>
  258.             Le format <tt class="filename">.vbr</tt> est utilis├⌐ pour les brosses 
  259.             param├⌐triques, c├ád les brosses cr├⌐├⌐es avec l'├ëditeur de brosse. Il 
  260.             n'y a vraiment pas d'autre fa├ºon valable d'obtenir les fichiers de 
  261.             ce format.
  262.           </p>
  263.             </dd>
  264.           </dl>
  265.         </div>
  266.         <p>
  267.       To make a brush available, place it in one of the folders in
  268.       GIMP's brush search path. By default, the brush search path
  269.       includes two folders, the system <tt class="filename">brushes</tt>
  270.       folder, which you should not use or alter, and the
  271.       <tt class="filename">brushes</tt> folder inside your personal GIMP
  272.       directory.  You can add new folders to the brush search path
  273.       using the <a href="ch04s18s16.html" title="18.16.┬áData Folders">Brush
  274.       Folders</a> page of the Preferences dialog.  Any GBR, GIH, or
  275.       VBR file included in a folder in the brush search path will show
  276.       up in the Brushes dialog the next time you start GIMP, or as soon
  277.       as you press the Refresh button in the Brushes dialog.
  278.     </p>
  279.         <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
  280.           <table border="0" summary="Note">
  281.             <tr>
  282.               <td rowspan="2" align="center" valign="top" width="25">
  283.                 <img alt="[Note]" src="../images/note.png" />
  284.               </td>
  285.               <th align="left">Note</th>
  286.             </tr>
  287.             <tr>
  288.               <td colspan="2" align="left" valign="top">
  289.                 <p>
  290.         When you create a new parametric brush using the Brush Editor, it
  291.         is automatically saved in your personal
  292.         <tt class="filename">brushes</tt> folder.
  293.       </p>
  294.               </td>
  295.             </tr>
  296.           </table>
  297.         </div>
  298.         <p>
  299.       There are a number of web sites with downloadable collections of
  300.       GIMP brushes.  Rather than supplying a list of links that will
  301.       soon be out of date, the best advice is to do a Google search for
  302.       "Gimp brushes".  There are also many collections of brushes for
  303.       other programs with painting functionality.  Some can be converted
  304.       easily into GIMP brushes, some require special conversion
  305.       utilities, and some cannot be converted at all.  Most fancy
  306.       procedural brush types fall into the last category.  If you need
  307.       to know, look around on the web, and if you don't find anything,
  308.       look for an expert to ask. 
  309.     </p>
  310.       </div>
  311.       <div class="simplesect" lang="en" xml:lang="en">
  312.         <div class="titlepage">
  313.           <div>
  314.             <div>
  315.               <h4 class="title"><a id="gimp-GIH-dialog"></a>The GIH dialog box</h4>
  316.             </div>
  317.           </div>
  318.         </div>
  319.         <p>
  320.       This dialog box has several options not easy to understand. They 
  321.       allow you to determine the way your brush is animated. 
  322.     </p>
  323.         <div class="variablelist">
  324.           <dl>
  325.             <dt>
  326.               <span class="term">Spacing (Percent)</span>
  327.             </dt>
  328.             <dd>
  329.               <p>
  330.             "Spacing" is the distance between consecutive brush marks when you 
  331.             trace out a brushstroke with the pointer. You must consider 
  332.             drawing with a brush, whatever the paint tool, like stamping. If 
  333.             Spacing is low, stamps will be very close and stroke look 
  334.             continuous. If spacing is high, stamps will be separated: that's 
  335.             interesting with a color brush (like "green pepper" for instance).
  336.             Value varies from 1 to 200 and this percentage refers to brush 
  337.             "diameter": 100% is one diameter.
  338.           </p>
  339.             </dd>
  340.             <dt>
  341.               <span class="term">Description</span>
  342.             </dt>
  343.             <dd>
  344.               <p>
  345.             It's the brush name that will appear at the top of Brush Dialog 
  346.             (grid mode) when the brush is selected.
  347.           </p>
  348.             </dd>
  349.             <dt>
  350.               <span class="term">Cell Size</span>
  351.             </dt>
  352.             <dd>
  353.               <p>
  354.             That's size of cells you will cut up in layers... Default 
  355.             is one cell per layer and size is that of the layer. Then there is 
  356.             only one brush aspect per layer
  357.           </p>
  358.               <p>
  359.             We could have only one big layer and cut up in it the cells that 
  360.             will be used for the different aspects of the animated brush.
  361.           </p>
  362.               <p>
  363.             For instance, we want a 100x100 pixels brush with 8 different 
  364.             aspects. We can take these 8 aspects from a 400x200 pixels layer, or 
  365.             from a 300x300 pixels layer but with one cell unused.
  366.           </p>
  367.             </dd>
  368.             <dt>
  369.               <span class="term">Number of cells</span>
  370.             </dt>
  371.             <dd>
  372.               <p>
  373.             That's the number of cells (one cell per aspect) that will be cut in 
  374.             every layer. Default is the number of layers as there is only one 
  375.             layer per aspect. 
  376.           </p>
  377.             </dd>
  378.             <dt>
  379.               <span class="term">Display as:</span>
  380.             </dt>
  381.             <dd>
  382.               <p>
  383.             This tells how cells have been arranged in layers. If, for example, 
  384.             you have placed height cells at the rate of two cells per layer on 
  385.             four layers, GIMP will display: "1 rows of 2 columns on each layer".
  386.           </p>
  387.             </dd>
  388.             <dt>
  389.               <span class="term">Dimension, Ranks, Selection</span>
  390.             </dt>
  391.             <dd>
  392.               <p>
  393.             There things are getting complicated! Explanations are necessary to 
  394.             understand how to arrange cell and layers.
  395.           </p>
  396.               <p>
  397.             GIMP starts retrieving cells from each layer and stacks them into a 
  398.             FIFO stack (First In First Out: the first in is at the top of the 
  399.             stack and so can be first out). In our example 4 layers with 2 cells 
  400.             in each, we'll have, from top to bottom: first cell of first layer, 
  401.             second cell of first layer, first cell of second layer, second cell 
  402.             of second layer..., second cell of fourth layer. With one cell per 
  403.             layer or with several cells per layer, result is the same. You can 
  404.             see this stack in the Layer Dialog of the resulting .gih image file.
  405.             </p>
  406.               <p>
  407.             Then GIMP creates a computer array from this stack with the 
  408.             <span class="guilabel">Dimensions</span> you have set. You can use four 
  409.             dimensions.  
  410.           </p>
  411.               <p>
  412.             In computer science an array has a "myarray(x,y,z)" form for a 3 
  413.             dimensions array (3D). It's easy to imagine a 2D array: on a paper 
  414.             it's an array with rows and columns
  415.             </p>
  416.               <div class="mediaobject">
  417.                 <img src="../images/using/array2D.png" />
  418.               </div>
  419.               <p>
  420.             With a 3d array we don't talk rows and columns but 
  421.             <span class="guilabel">Dimensions</span> and <span class="guilabel">Ranks</span>. The 
  422.             first dimension is along x axis, the second dimension along y axis, 
  423.             the third along z axis. Each dimension has ranks of cells. 
  424.             </p>
  425.               <div class="mediaobject">
  426.                 <img src="../images/using/array3D.png" />
  427.               </div>
  428.               <p>
  429.           </p>
  430.               <p>
  431.             To fill up this array, GIMP starts retrieving cells from the top of 
  432.             stack. The way it fills the array reminds that of an odometer: right 
  433.             rank digits turn first and, when they reach their maximum, left rank 
  434.             digits start running. If you have some memories of Basic programming 
  435.             you will have, with an array(4,2,2), the following succession:
  436.             (1,1,1),(1,1,2),(1,2,1),(1,2,2),(2,1,1),(2,1,2),(2,2,2),(3,1,1)....
  437.             (4,2,2). We will see this later in an example.
  438.           </p>
  439.               <p> 
  440.             Besides the rank number that you can give to each dimension, you can 
  441.             also give them a <span class="guilabel">Selection</span> mode. You have 
  442.             several modes that will be applyed when drawing:
  443.             </p>
  444.               <div class="itemizedlist">
  445.                 <ul type="disc">
  446.                   <li>
  447.                     <p>
  448.                   <span class="emphasis"><em>Incremental</em></span>: GIMP selects a rank from the 
  449.                   concerned dimension according to the order ranks have in that 
  450.                   dimension
  451.                 </p>
  452.                   </li>
  453.                   <li>
  454.                     <p>
  455.                   <span class="emphasis"><em>Random</em></span>: GIMP selects a rank at random 
  456.                   from the concerned dimension.
  457.                 </p>
  458.                   </li>
  459.                   <li>
  460.                     <p>
  461.                   <span class="emphasis"><em>Angular</em></span>: GIMP selects a rank in the 
  462.                   concerned dimension according to the moving angle of the brush.
  463.                 </p>
  464.                     <p>
  465.                   The first rank is for the direction 0┬░, upwards. The other 
  466.                   ranks are affected, counter clockwise, to an angle whose value 
  467.                   is 360/number of ranks. So, with 4 ranks in the concerned 
  468.                   dimension, the angle will move 90┬░ counterclockwise for each 
  469.                   direction change: second rank will be affected to 270┬░ (-90┬░) 
  470.                   (leftwards), third rank to 180┬░ (downwards) and fourth rank to 
  471.                   90┬░ (rightwards).
  472.                 </p>
  473.                   </li>
  474.                   <li>
  475.                     <p>
  476.                   <span class="emphasis"><em>Speed</em></span>,
  477.                   <span class="emphasis"><em>Pressure</em></span>,
  478.                   <span class="emphasis"><em>x tilt</em></span> and 
  479.                   <span class="emphasis"><em>y tilt</em></span> are options for sophisticated 
  480.                   drawing tablets.
  481.                </p>
  482.                   </li>
  483.                 </ul>
  484.               </div>
  485.               <p>
  486.           </p>
  487.             </dd>
  488.           </dl>
  489.         </div>
  490.         <div class="variablelist">
  491.           <p class="title">
  492.             <b>Examples</b>
  493.           </p>
  494.           <dl>
  495.             <dt>
  496.               <span class="term">A one dimension image pipe</span>
  497.             </dt>
  498.             <dd>
  499.               <p>
  500.             Well! What is all this useful for? We'll see that gradually with 
  501.             examples. You can actually place in each dimension cases that will 
  502.             give your brush a particular action.   
  503.           </p>
  504.               <p>
  505.             Let us start with a 1D brush which will allow us to study selection 
  506.             modes action. We can imagine it like this:
  507.             </p>
  508.               <div class="mediaobject">
  509.                 <img src="../images/using/array1D.png" />
  510.               </div>
  511.               <p>
  512.             Follow these steps:
  513.             </p>
  514.               <div class="orderedlist">
  515.                 <ol type="1">
  516.                   <li>
  517.                     <p>
  518.                   Open a new 30x30 pixels image, RGB with Transparent fill type. 
  519.                   Using the Text tool create 4 layers "1", "2", "3", "4". Delete 
  520.                   the "background" layer.
  521.                 </p>
  522.                   </li>
  523.                   <li>
  524.                     <p>
  525.                   Save this image first with .xcf extension to keep its 
  526.                   properties then save it as .gih.
  527.                 </p>
  528.                     <p>
  529.                   The Save As Dialog is opened: select a destination for your 
  530.                   image. OK. The GIH dialog is opened:
  531.                   Choose Spacing 100, give a name in Description box, 30x30 for 
  532.                   Cell Size, 1 dimension, 1 rank and choose "Incremental" in 
  533.                   Selection box. OK.
  534.                 </p>
  535.                     <p>
  536.                   You may have difficulties to save directly in the GIMP Brush 
  537.                   directory. In that case, save the .gih file manually into the 
  538.                   /usr/share/gimp/gimp 2.0/brushes directory. Then come back 
  539.                   into the Toolbox, clic on the brush icon to open the Brush 
  540.                   Dialog then click on "Refresh". Your new brush appears in the 
  541.                   Brush window. Select it. Select pencil tool for instance and 
  542.                   click and hold with it on a new image
  543.                   </p>
  544.                     <div class="mediaobject">
  545.                       <img src="../images/using/1234incr.png" />
  546.                     </div>
  547.                     <p>
  548.                   You see 1, 2, 3, 4 digits following one another in order.
  549.                 </p>
  550.                     <p> 
  551.                   Take your .xcf image file back and save it as .gih setting 
  552.                   Selection to "Random": digits will be displayed at random 
  553.                   order:
  554.                   </p>
  555.                     <div class="mediaobject">
  556.                       <img src="../images/using/1234rand.png" />
  557.                     </div>
  558.                     <p>
  559.                 </p>
  560.                     <p> 
  561.                   Now select "Angular" Selection:
  562.                   </p>
  563.                     <div class="mediaobject">
  564.                       <img src="../images/using/1234angl.png" />
  565.                     </div>
  566.                     <p>
  567.                 </p>
  568.                   </li>
  569.                 </ol>
  570.               </div>
  571.               <p>  
  572.   
  573.           </p>
  574.             </dd>
  575.             <dt>
  576.               <span class="term">A 3 dimensions image hose</span>
  577.             </dt>
  578.             <dd>
  579.               <p>
  580.             We are now going to create a 3D animated brush: its orientation will 
  581.             vary according to brush direction, it will alternate Left/Right 
  582.             hands regularly and its color will vary at random between black and 
  583.             blue. 
  584.           </p>
  585.               <p>
  586.             The first question we have to answer to is the number of images that 
  587.             is necessary. We reserve the first dimension (x) to the brush 
  588.             direction (4 directions). The second dimension (y) is for Left/Right 
  589.             alternation and the third dimension (z) for color variation. Such a 
  590.             brush is represented in a 3D array "myarray(4,2,2)": 
  591.             </p>
  592.               <div class="mediaobject">
  593.                 <img src="../images/using/3Dnum.png" />
  594.               </div>
  595.               <p>
  596.             There are 4 ranks in first dimension (x), 2 ranks in second 
  597.             dimension (y) and 2 ranks in third dimension (z). We see that there 
  598.             are 4x2x2 = 16 cells. We need 16 images.
  599.           </p>
  600.               <div class="orderedlist">
  601.                 <ol type="1">
  602.                   <li>
  603.                     <p>
  604.                 <span class="emphasis"><em>Creating images of dimension 1 (x)</em></span>: 
  605.                 Open a new 30x30 pixels image, RGB with Transparent Fill Type. 
  606.                 Using the zoom draw a left hand with fingers upwards. Save it as 
  607.                 handL0k.xcf (hand Left O┬░ Black).
  608.               </p>
  609.                     <p>
  610.                 Open the Layer Dialog. Double click on the layer to open the 
  611.                 Layer Attributes Dialog and rename it to handL0k.
  612.               </p>
  613.                     <p>
  614.                 Duplicate the layer. Let visible only the duplicated layer, 
  615.                 select it and apply a 90┬░ rotation (Layer/Transform/ 90┬░ 
  616.                 rotation counter-clockwise). Rename it to handL-90k.
  617.               </p>
  618.                     <p>
  619.                 Repeat the same operations to create handL180k and handL90k.
  620.               </p>
  621.                   </li>
  622.                   <li>
  623.                     <p>
  624.                 <span class="emphasis"><em>Creating images of dimension 2 (y)</em></span>:
  625.                 This dimension in our example has two ranks, one for left hand 
  626.                 and the other for right hand. The left hand rank exists yet. We 
  627.                 shall build right hand images by flipping it horisontally.
  628.               </p>
  629.                     <p>
  630.                 Duplicate the handL0k layer. Let it visible only and select it. 
  631.                 Rename it to handR0K. Apply Layer/Transform/Flip Horizontally.
  632.               </p>
  633.                     <p>
  634.                 Repeat the same operation on the other left hand layers to 
  635.                 create their right hand equivalent.
  636.               </p>
  637.                     <p>
  638.                 Re-order layers to have a counter-clockwise rotation from top to 
  639.                 bottom, alternating Left and Right: handL0k, handR0k, handL-90k,
  640.                 handR-90k, ..., handR90k.
  641.               </p>
  642.                   </li>
  643.                   <li>
  644.                     <p>
  645.                 <span class="emphasis"><em>Creating images of dimension 3 (z)</em></span>:
  646.                 The third dimension has two ranks, one for black color and the 
  647.                 other for blue color. The first rank, black, exists yet. We well 
  648.                 see that images of dimension 3 will be a copy, in blue, of the 
  649.                 images of dimension 2. So we will have our 16 images. But a row 
  650.                 of 16 layers is not easy to manage: we will use layers with two 
  651.                 images.
  652.               </p>
  653.                     <p>
  654.                 Select the handL0k layer and let it visible only. Using 
  655.                 Image/Canvas Size change canvas size to 60x30 pixels.
  656.               </p>
  657.                     <p>
  658.                 Duplicate hand0k layer. On the copy, fill the hand with blue 
  659.                 using Bucket Fill tool.
  660.               </p>
  661.                     <p>
  662.                 Now, select the Move tool. Double click on it to accede to its 
  663.                 properties: check "Move the Current Layer" option. Move the blue 
  664.                 hand into the right part of the layer precisely with the help of 
  665.                 Zoom.
  666.               </p>
  667.                     <p>
  668.                 Make sure only handL0k and its blue copy are visible. Right click 
  669.                 on the Layer Dialog: Apply the "Merge Visible Layers" command 
  670.                 with the option "Expand as Necessary". You get a 60x30 pixels 
  671.                 layer with the black hand on the left and the blue hand on the 
  672.                 right. Rename it to "handL0".
  673.               </p>
  674.                     <p>
  675.                 Repeat the same operations on the other layers.
  676.               </p>
  677.                   </li>
  678.                   <li>
  679.                     <p>
  680.                 <span class="emphasis"><em>Set layers in order</em></span>: Layers must be set in 
  681.                 order so that GIMP can find the required image at some point 
  682.                 of using the brush. Our layers are yet in order but we must 
  683.                 understand more generally how to have them in order.There are 
  684.                 two ways to imagine this setting in order. The first method is 
  685.                 mathematical: GIMP divides the 16 layers first by 4; that gives 
  686.                 4 groups of 4 layers for the first dimension. Each group 
  687.                 represents a direction of the brush. Then, it divides each group 
  688.                 by 2; that gives 8 groups of 2 layers for the second dimension: 
  689.                 each group represents a L/R alternation. Then another division 
  690.                 by 2 for the third dimension to represent a color at random 
  691.                 between black and blue.
  692.               </p>
  693.                     <p>
  694.                 The other method is visual, by using the array representation. 
  695.                 Correlation between two methods is represented in next image:
  696.                 </p>
  697.                     <div class="mediaobject">
  698.                       <img src="../images/using/correlation-en.png" />
  699.                     </div>
  700.                     <p>
  701.               </p>
  702.                   </li>
  703.                   <li>
  704.                     <p>
  705.                 Voil├á. Your brush is ready. Save it as .xcf first then as .gih 
  706.                 with the following parameters:
  707.                 Spacing:100    Description:Hands      Cell Size: 30x30
  708.                 Number of cells:16    Dimensions: 3
  709.                 </p>
  710.                     <div class="itemizedlist">
  711.                       <ul type="disc">
  712.                         <li>
  713.                           <p> 
  714.                     Dimension 1: 4 ranks  Selection: Angular
  715.                     </p>
  716.                         </li>
  717.                         <li>
  718.                           <p>
  719.                     Dimension 2: 2 ranks  Selection: Incremental
  720.                     </p>
  721.                         </li>
  722.                         <li>
  723.                           <p>
  724.                     Dimension 3: 2 ranks  S├⌐lection: Random
  725.                     </p>
  726.                         </li>
  727.                       </ul>
  728.                     </div>
  729.                     <p>
  730.               </p>
  731.                     <p>
  732.                 Place your .gih file into GIMP brush directory and refresh the 
  733.                 brush box. You can now use your brush. Unfortunately GIMP 2.0 is 
  734.                 bug-ridden and you may have some difficulties with brush 
  735.                 orientation.
  736.               </p>
  737.                     <p>
  738.                 Here is the result by stroking an elliptical selection with the 
  739.                 brush: 
  740.                 </p>
  741.                     <div class="mediaobject">
  742.                       <img src="../images/using/hands_stroke.png" />
  743.                     </div>
  744.                     <p>
  745.               </p>
  746.                   </li>
  747.                 </ol>
  748.               </div>
  749.             </dd>
  750.           </dl>
  751.         </div>
  752.       </div>
  753.     </div>
  754.     <div class="navfooter">
  755.       <hr />
  756.       <table width="100%" summary="Navigation footer">
  757.         <tr>
  758.           <td width="40%" align="left"><a accesskey="p" href="ch02s04s07.html">Prev</a>┬á</td>
  759.           <td width="20%" align="center">
  760.             <a accesskey="u" href="ch02s04.html">Up</a>
  761.           </td>
  762.           <td width="40%" align="right">┬á<a accesskey="n" href="ch02s04s09.html">Next</a></td>
  763.         </tr>
  764.         <tr>
  765.           <td width="40%" align="left" valign="top">4.7.┬áPaths┬á</td>
  766.           <td width="20%" align="center">
  767.             <a accesskey="h" href="index.html">Home</a>
  768.           </td>
  769.           <td width="40%" align="right" valign="top">┬á4.9.┬áGradients</td>
  770.         </tr>
  771.       </table>
  772.     </div>
  773.   </body>
  774. </html>
  775.